public class Factorial {
	public static void main(String[] args) {
		
		
		
		for(int i = 1; i <= 25; i++){
			long nResult = 1;
			for(int j = i; j > 0; j--){
				nResult *= j;
			}			
			System.out.println( i+"! = " + nResult);			
		}
		
	}
}
